<template>
	<view class="content">
		<view class="content-card" v-for="place in placeList" @click="toPage(place)">
			<view>
				<text style="font-size: 40rpx;color: #5f5f5f;font-weight: 550;">{{place.placeName}}</text>
			</view>
			<view style="display: flex;flex-direction: row;justify-content: space-between;height: 60rpx;">
				<text style="color: #bbb;">{{place.address}}</text>
				<text style="margin-right: 20rpx;color: #bbb;">
					{{place.distance}}
					<uni-icons type="forward" color="#bbb" size="10"></uni-icons>
				</text>
			</view>
			<view class="imgs">
				<image class="img" v-for="img in place.imgs" :src="img"></image>
			</view>
			<br><br>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				placeList: [{
					placeName: "Handsome羽球中心",
					address: "上海市浦东新区创客大厦1楼101",
					distance: "2km",
					imgs: ["/static/p3.jpg", "/static/p4.jpg"]
				}, {
					placeName: "佳佰汇羽毛球",
					address: "上海市浦东新区创客大厦1楼102",
					distance: "4km",
					imgs: ["/static/p1.jpg", "/static/p2.jpg"]
				}]
			}
		},
		onLoad() {

		},
		methods: {
			toPage(place) {
				uni.navigateTo({
					url: '/pages/place/index'
				});
			}
		}
	}
</script>

<style lang="scss">
	.content {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
		background-color: white;
		height: 1200rpx;

		.content-card {
			margin-left: 20rpx;

			.imgs {
				display: flex;
				flex-direction: row;

				.img {
					width: 340rpx;
					height: 250rpx;
					border-radius: 10rpx;
					margin-right: 20rpx;
				}
			}
		}
	}
</style>
